-- GENERATED SPELL FOR [Kolkar Invader] --


function spell0_9524(pUnit, Event) --@Fling Torch,n/a--
pUnit:FullCastSpellOnTarget(14292,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9524', 1000, 1)
end

function spell1_9524(pUnit, Event) --@Rushing Charge,Self--
pUnit:FullCastSpellOnTarget(6268,pUnit)
pUnit:RegisterEvent('Sorts_9524', 3000, 1)
end

function spell2_9524(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9524', 595, 1)
end

function spell3_9524(pUnit, Event) --@Tetanus,n/a--
pUnit:FullCastSpellOnTarget(8014,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9524', 530, 1)
end

function Sorts_9524(pUnit, Event)
local choix_sorts_9524 = math.random(0, 3)
if choix_sorts_9524 == 0 then
pUnit:RegisterEvent('spell0_9524', 1, 1)
end
if choix_sorts_9524 == 1 then
pUnit:RegisterEvent('spell1_9524', 1, 1)
end
if choix_sorts_9524 == 2 then
pUnit:RegisterEvent('spell2_9524', 1, 1)
end
if choix_sorts_9524 == 3 then
pUnit:RegisterEvent('spell3_9524', 1, 1)
end
end

function mob9524_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9524', math.random(1500, 3000), 1)
end

function mob9524_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9524_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9524_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9524, 1, 'mob9524_Action')
RegisterUnitEvent(9524, 2, 'mob9524_Leave')
RegisterUnitEvent(9524, 3, 'mob9524_Kill')
RegisterUnitEvent(9524, 4, 'mob9524_Die')
